package day09.Ti.HashiSetDome;


import java.util.HashSet;
import java.util.Iterator;

public class Ti01 {
    public static void main(String[] args) {
        HashSet<Student> hm=new HashSet<>();
        Student s1 = new Student("赵丽颖", 18);
        Student s2 = new Student("范冰冰", 20);
        Student s3 = new Student("杨幂", 19);
        hm.add(s1);
        hm.add(s2);
        hm.add(s3);
        Iterator<Student> it = hm.iterator();
        while (it.hasNext()){
            Student s = it.next();
            System.out.println(s);
        }

    }
}
